<template>
  <div class="page">
    <div class="user">
      <div class="label">我的简历</div>
      <div class="flex align-center justify-between user-detail">
        <div class="flex align-center">
          <image class="user-icon" src=""></image>
          <div class="name">{{ userJob.name }}</div>
          <image class="sex" src=""></image>
          <div class="age">36岁</div>
        </div>
        <div class="edit">编辑</div>
      </div>
    </div>



    <div class="tab-content">
      <div class="label">教育经历</div>
      <div class="tab-ul">
        <div class="tab-item" >
          <image class="icon" src=""></image>
          <div class="txt">北京大学</div>

          <div class="item-label">博士</div>
        </div>
        <div class="tab-item" >
          <image class="icon" src=""></image>
          <div class="txt">西南政法大学</div>
          <div class="item-label">硕士</div>

        </div>
        <div class="tab-item" >
          <image class="icon" src=""></image>
          <div class="txt">浙江工业大学</div>
          <div class="item-label">大学</div>
        </div>
      </div>
    </div>

    <div class="tab-content">
      <div class="label">工作经历</div>
      <div class="tab-ul">
        <div class="tab-item" v-for="item in userJob.work_history" >
          <image class="icon" src="/static/icon/work.png"></image>
          <div class="txt">{{ item.company }}</div>
          <div class="tag active">在职</div>

          <div class="item-label">{{ item.position }}</div>
        </div>
      </div>
    </div>

    <div class="tab-content">
      <div class="label">联系方式</div>
      <div class="tab-ul">
        <div class="tab-item" >
          <image class="icon" src=""></image>
          <div class="txt">168856606</div>

          <div class="item-label">手机号码</div>
        </div>
        <div class="tab-item" >
          <image class="icon" src=""></image>
          <div class="txt">Zheshiweixing</div>
          <div class="item-label">微信号</div>

        </div>
        <div class="tab-item" >
          <image class="icon" src=""></image>
          <div class="txt">去评论赚能量</div>
          <div class="item-label">大学</div>
        </div>
      </div>
    </div>
  </div>
  <BTab></BTab>
</template>

<script lang="ts" setup>
import BTab from "../../components/BTab.vue";
import {onMounted, shallowRef} from "vue";
import {parseQuery} from "../../utils/URLParam";
import {resumeDetail_data} from "../../api/user";
const userJob = shallowRef({});

onMounted(() => {
  const {id} = parseQuery()
  resumeDetail_data(id).then(res => {
    userJob.value = res
  })
})
</script>

<style scoped lang="scss">
  .page {
    .label {
      font-size: 30rpx;
      font-weight: 500;
      color: #0D3333;
      line-height: 42rpx;
    }
  }
  .user {
    padding: 48rpx 48rpx 10rpx ;
    .user-detail {
      padding: 32rpx 0;
      .user-icon {
        width: 120rpx;
        height: 120rpx;
        border-radius: 50%;
      }
      .name {
        font-size: 32rpx;
        font-weight: 500;
        color: #0D3333;
        line-height: 44rpx;
        padding: 0 32rpx;
      }
      .sex {
        width: 24rpx;
        height: 23rpx;
        background: #FC7265;
      }
      .age {
        height: 32rpx;
        font-size: 22rpx;
        font-weight: 400;
        color: #0D3333;
        line-height: 32rpx;
        margin: 0 12rpx;
      }
      .edit {
        width: 144rpx;
        height: 64rpx;
        background: #0D3333;
        border-radius: 24rpx;
        font-size: 28rpx;
        font-weight: 500;
        color: #FFFCF2;
        line-height: 64rpx;
        text-align: center;
      }
    }
  }

.tab-content {
  padding: 32rpx ;
  .label {
    padding: 0 22rpx;
  }
  .tab-ul {
    //height: 292rpx;
    background: #FFFFFF;
    border-radius: 24px;
    border: 2px solid rgba(0,0,0,0.08);
    padding: 0 38rpx;
    margin: 18rpx 0 ;
    .tab-item {
      display: flex;
      align-items: center;
      height: 96rpx;
      border-top:  2px solid rgba(0,0,0,0.08);
      padding: 0 8rpx;
      &:first-child {
        border: none;
      }
      .icon {
        width: 42rpx;
        height: 42rpx;
        background: rgba(36, 250, 246, 0.38);
      }
      .txt {
        font-size: 28rpx;
        font-weight: 400;
        color: #0D3333;
        line-height: 28rpx;
        padding: 0 22rpx;
      }

      .tag {
        width: 76rpx;
        height: 32rpx;
        background: rgba(13, 51, 51, 0.16);
        border-radius: 20rpx;
        font-size: 20rpx;
        font-weight: 400;
        color: #0D3333;
        line-height: 32rpx;
        margin-left: 16rpx;
        text-align: center;
        &.active {
          background: #24FAF6;
        }
      }
      .item-label {
        margin-left: auto;
        font-size: 24rpx;
        font-weight: 400;
        color: #0D3333;
      }
    }
  }
}
</style>
